var mebtnopenurl = window.location.href;
window.shareData = {
    "imgUrl": "http://c39_jiang.houdunphp.com/drage15/images/sh.jpg",
    "timeLineLink": window.location.href,
    "tTitle": "我的健康承诺",
    "tContent": "爱康君安生命梦想家颁奖盛典邀你为自己的健康做出承诺。"
};
document.addEventListener("WeixinJSBridgeReady",
function onBridgeReady() {
    WeixinJSBridge.on("menu:share:appmessage",
    function(a) {
        WeixinJSBridge.invoke("sendAppMessage", {
            "img_url": window.shareData.imgUrl,
            "link": window.shareData.timeLineLink,
            "desc": window.shareData.tContent,
            "title": window.shareData.tTitle
        },
        function(b) {
            document.location.href = mebtnopenurl
        })
    });
    WeixinJSBridge.on("menu:share:timeline",
    function(a) {
        WeixinJSBridge.invoke("shareTimeline", {
            "img_url": window.shareData.imgUrl,
            "img_width": "300",
            "img_height": "300",
            "link": window.shareData.timeLineLink,
            "desc": window.shareData.tContent,
            "title": window.shareData.tContent
        },
        function(b) {
            document.location.href = mebtnopenurl
        })
    })
},
false);
$(document).ready(function() {
    function a() {
        WeixinJSBridge.call("hideToolbar")
    }
    if (typeof WeixinJSBridge == "undefined") {
        if (document.addEventListener) {
            document.addEventListener("WeixinJSBridgeReady", a, false)
        } else {
            if (document.attachEvent) {
                document.attachEvent("WeixinJSBridgeReady", a);
                document.attachEvent("onWeixinJSBridgeReady", a)
            }
        }
    } else {
        a()
    }
});